/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package unc.pds.data;

import java.rmi.RemoteException;
import java.util.Date;
import java.util.List;
import javax.ejb.EJBException;
import javax.ejb.EJBObject;

/**
 *
 * @author ain
 */
public interface RootDataBeanRemote extends EJBObject {

    //убивает все И детей
    public void dropMe() throws RemoteException;
    //убивает только текущие параметры, но сохраняет саму сущность(запись в OBJECTS)
    public void eraseMe() throws RemoteException;

    public Date getCrDate() throws EJBException, RemoteException;
    public Long getID() throws EJBException, RemoteException;
    public Long getParentID() throws EJBException, RemoteException;
    public String getName() throws EJBException, RemoteException;
    public String getObjectTypeName() throws EJBException, RemoteException;
    
    public String getParameter(String name) throws EJBException, RemoteException;
    public String[] getParameters(String name) throws EJBException, RemoteException;
    public void setParameter(String name, String value) throws EJBException, RemoteException;
    public void addParameter(String name, String value) throws EJBException, RemoteException;
    public void dropParameter(String name, String value) throws EJBException, RemoteException;

    public String getContent(String name) throws EJBException, RemoteException;
    public void setContent(String name, String content) throws EJBException, RemoteException;

    public boolean isOwnerSomehow(Long key) throws RemoteException;

    public boolean isAuthor(Long auKey)throws RemoteException;

    public boolean isFriend(Long key) throws RemoteException;
    public boolean isEnemy(Long key) throws RemoteException;
    public boolean isWannedFriend(Long key) throws RemoteException;

    public void setSessionKey(Long nsessionKey) throws RemoteException;

    public boolean hasField(String name, String value) throws RemoteException;
}
